package com.example.demo;

import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2023-02-12
 * Time:20:39
 */
//添加拦截器
public class Interceptor implements WebMvcConfigurer {
    private GetSession getSession;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(getSession).addPathPatterns("/**");
    }
}
